<apes-header>
  <apes-button-list class="buttonList" [ctx]="ctx" [buttonBarMetadata]="buttonBar"
                    (click)="onEvent($event)"></apes-button-list>
</apes-header>

<apes-content>
  <apes-card [apesBordered]="false">
    <div class="boxShowFlex">
      <!-- 制单日期 -->
      <div apes-col apesSpan="8">
        <div>
          <span>制单日期</span>
          <div class="boxDiv">
            <apes-range-picker [(ngModel)]='mdjcTime' [apesFormat]="'yyyy-MM-dd'"></apes-range-picker>
          </div>
        </div>
        <p [ngStyle]="{ display: hind }"><i class="anticon anticon-exclamation-circle-o"></i> 必填！最小时间为一天 </p>
      </div>

      <!-- 门店 -->
      <div apes-col apesSpan="8" [ngStyle]="{ display: store }">
        <span>门店</span>
        <ng-select style="width: 240px; display: inline-block;"
                   clearAllText
                   [items]="arrNXMD"
                   bindLabel="MDMC"
                   bindValue="MDID"
                   [placeholder]="'选填'" [notFoundText]="'无法找到'" typeToSearchText [(ngModel)]="ngNXMD">
        </ng-select>
      </div>

      <!-- 金额大于 -->
      <div apes-col apesSpan="8">
        <div>
          <span>金额大于</span>
          <apes-input-number [(ngModel)]="moneyValue" [apesStep]="1" [apesPlaceHolder]="'请输入金额'"
                             style="width: 240px"></apes-input-number>
        </div>
        <p [ngStyle]="{ display: hidn }"><i class="anticon anticon-exclamation-circle-o"></i> 必填！金额必须大于 0 </p>
      </div>

      <!-- 确认耗时超 -->
      <div apes-col apesSpan="8">
        <div>
          <span>确认耗时</span>
          <apes-input-number [(ngModel)]="timeValue" [apesStep]="0.5" [apesPlaceHolder]="'请输入超时时长'"
                             style="width: 240px"></apes-input-number>
        </div>
        <p [ngStyle]="{ display: hindd }"><i class="anticon anticon-exclamation-circle-o"></i> 超时时长不能为负数 </p>
      </div>

      <!-- 接车人 -->
      <div apes-col apesSpan="8" [ngStyle]="{ display: personal }">
        <span>接车人</span>
        <input type="text" apes-input placeholder="请输入接车人员名称" [(ngModel)]="jcrName" style="width: 240px;">
      </div>

      <!-- 销售组 -->
      <div apes-col apesSpan="8">
        <span>销售组</span>
        <ng-select style="width: 240px; display: inline-block;"
                   typeToSearchText
                   [items]="sale"
                   multiple="true"
                   bindLabel="XSZMC"
                   bindValue="XSZID"
                   placeholder="选填，可多选"
                   [(ngModel)]="saleID"
                   [notFoundText]="'无法找到'">
        </ng-select>
      </div>

      <div apes-col apesSpan="8">
        <span>公司：</span>
        <ng-select style="width: 240px; display: inline-block;"
                   typeToSearchText
                   [items]="companyData"
                   multiple="true"
                   bindLabel="name"
                   bindValue="id"
                   placeholder="选填，可多选"
                   [(ngModel)]="companyList"
                   [notFoundText]="'无法找到'"
                   (change)="getNxmdData()">
        </ng-select>
      </div>
    </div>

    <apes-tabset>
      <apes-tab apesTitle="门店" (apesClick)="getStoreCheck()">
        <service-rate-store></service-rate-store>
      </apes-tab>

      <apes-tab apesTitle="个人" (apesClick)="getPersonalCheck()">
        <service-rate-personal></service-rate-personal>
      </apes-tab>
    </apes-tabset>
  </apes-card>
</apes-content>
